package io.seata.factoryservice.rabbitmq;

import com.rabbitmq.client.Channel;
import org.springframework.amqp.core.Message;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

/**
 * Created by IntelliJ IDEA.
 *
 * @Author : author
 * @create 2022/8/22 17:49
 */
@Component
public class MessageConsumser {

    @RabbitListener(queues = "queuenaoh")
    public void receiveNaoh(String msg, Message message, Channel channel){
        System.out.println("处理naoh");
        System.out.println("msg:"+msg);
        System.out.println("message:"+message);
        System.out.println("channel:"+channel);

    }

    @RabbitListener(queues = "queuenahco3")
    public void receivenahco3(String msg, Message message, Channel channel){
        System.out.println("处理nahco3");
        System.out.println("msg:"+msg);
        System.out.println("message:"+message);
        System.out.println("channel:"+channel);

    }

    @RabbitListener(queues = "queuenh3")
    public void receivenh3(String msg, Message message, Channel channel){
        System.out.println("处理nh3");
        System.out.println("msg:"+msg);
        System.out.println("message:"+message);
        System.out.println("channel:"+channel);

    }
}
